package com.qingxin.ui.bean;

import java.util.ArrayList;
import java.util.List;

import org.codehaus.jackson.map.annotate.JsonSerialize;

@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class UILeftTab extends UILeftTabNode {
	
	private List<AccordionNode> accordionNodes;
	private List<TreeNode> treeNodes;
	
	public UILeftTab() {
	}
	
	
	
	public UILeftTab(String id, String name, String code, String title,
			String type, String url, String expand, String select, String ignoreparam) {
		super(id, name, code, title, type, url, expand, select, ignoreparam);
	}



	public List<AccordionNode> getAccordionNodes() {
		return accordionNodes;
	}
	public void setAccordionNodes(List<AccordionNode> accordionNodes) {
		this.accordionNodes = accordionNodes;
	}
	public void addAccordionNode(AccordionNode accordionNode){
		if(accordionNodes==null){
			accordionNodes = new ArrayList<AccordionNode>();
		}
		accordionNodes.add(accordionNode);
	}
	
	
	public List<TreeNode> getTreeNodes() {
		return treeNodes;
	}
	public void setTreeNodes(List<TreeNode> treeNodes) {
		this.treeNodes = treeNodes;
	}
	public void addTreeNode(TreeNode treeNode){
		if(treeNodes==null){
			treeNodes = new ArrayList<TreeNode>();
		}
		treeNodes.add(treeNode);
	}
	
	
	
	public UILeftTabNode getMenuTabNode(){
		return new UILeftTabNode(id, name, code, title, type, url, expand, select, uiparam);
	}
	
	
	
}
